#if TOOLS
using Godot;

[Tool]
public partial class VoxImporter : EditorPlugin
{
	private VoxFormatLoader loader;
	private VoxImportPlugin importer;
	public override void _EnterTree()
	{
		loader = new();
		importer = new();
		ResourceLoader.AddResourceFormatLoader(loader);
		AddImportPlugin(importer);
	}

	public override void _ExitTree()
	{
		ResourceLoader.RemoveResourceFormatLoader(loader);
		RemoveImportPlugin(importer);

		loader = null;
		importer = null;
	}
}
#endif
